<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Off Canvas Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="../common/bootstrap/css/bootstrap.css" type="text/css"></link>
    <!-- Custom styles for this template -->
	<link rel="stylesheet" href="../offcanvas.css" type="text/css"></link>
    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  <script type="text/javascript" src="../common/jquery-1.9.1.min.js"></script></head>
  <script type="text/javascript" src="../common/bootstrap/js/bootstrap.min.js"></script>
  <body>
    <div class="container">
    <div class="row">
        <div class="span12">
            <ul class="nav nav-tabs" id="myTabs">
              <li class="active"><a href="#home" data-toggle="tab">Home</a></li>
              <li><a href="#dpa" data-toggle="tab">DPA</a></li>
              <li><a href="#twon" data-toggle="tab">Verge</a></li>
            </ul>

            <div class="tab-content">
              <div class="tab-pane active" id="home">
                  <p>test</p>            
                </div>
              <div class="tab-pane" id="dpa" data-src="http://www.drugpolicy.org/">
                  <iframe src=""></iframe>
                </div>
              <div class="tab-pane" id="twon" data-src="http://player.vimeo.com/video/37138051?badge=0">
                  <iframe src="" width="500" height="203" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <p><a href="http://vimeo.com/37138051">ANTWON ♦ HELICOPTER</a> from <a href="http://vimeo.com/tauszik">Brandon Tauszik</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
                </div>
            </div>
        </div>
    </div>
</div>​

<script>
$('#myTabs').bind('show', function(e) {  
    alert("xxx")
    // identify the tab-pane
    paneID = $(e.target).attr('href');

    // get the value of the custom data attribute to use as the iframe source
    src = $(paneID).attr('data-src');

    //if the iframe on the selected tab-pane hasn't been loaded yet...
    if($(paneID+" iframe").attr("src")=="")
    {
        // update the iframe src attribute using the custom data-attribute value
        $(paneID+" iframe").attr("src",src);
    }
});
</script>
  </body>
</html>

